package com.findu.control;

import java.io.InputStream;
import java.net.URL;
import java.util.List;

import com.example.findu.R;
import com.findu.model.App;



import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class Activity_view_selectnamic_gardenful_MYAdapter extends BaseAdapter{
	private Context context;
	private List<App> text;
	private TextView textView1,textView2;
	private ImageView imageView;
	
	public Activity_view_selectnamic_gardenful_MYAdapter(Context context,List<App> text){
		this.context = context;
		this.text = text;
	}
	@Override
	public int getCount() {
		return text.size();
	}

	@Override
	public Object getItem(int position) {
		return text.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		final int index = position;	//�õ���ѡ��
		View view = convertView;	//�õ���ͼ
		//�����ͼΪ�վͼ���
		if(view == null){
			LayoutInflater inflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
			//��View�õ�item�ļ�
			view = inflater.inflate(R.layout.activity_view_selectnamic_gradenful_list_item, null);
		}
//		textView1 = (TextView) view.findViewById(R.id.item_textView1);
//		textView2 = (TextView) view.findViewById(R.id.item_textView2);
//		textView1.setText("����:"+text.get(index).getName());
//		textView2.setText("�۸�:"+text.get(index).getPrice());
//		
//		//��ʼ��ͼƬ���
//		imageView = (ImageView) view.findViewById(R.id.item_imageView);
		


		return view;
	}


}
